//
//  XMGTopItemView.m
//  02-美团的界面搭建
//
//  Created by xiaomage on 15/8/10.
//  Copyright (c) 2015年 小码哥. All rights reserved.
//

#import "XMGTopItemView.h"

@interface XMGTopItemView()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *subtitleLabel;
@property (weak, nonatomic) IBOutlet UIButton *iconButton;

@end

@implementation XMGTopItemView

+ (instancetype)topItemView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"XMGTopItemView" owner:nil options:nil] firstObject];
}

- (void)setTitle:(NSString *)title
{
    self.titleLabel.text = title;
}

- (void)setSubtitle:(NSString *)subtitle
{
    self.subtitleLabel.text = subtitle;
}

- (void)setIconButtonWithImage:(NSString *)image highImage:(NSString *)highImage
{
//    [self.iconButton setImage:[UIImage imageNamed:image] forState:UIControlStateNormal];
//    
//    [self.iconButton setImage:[UIImage imageNamed:highImage] forState:UIControlStateHighlighted];
}

- (void)addTarget:(id)target action:(SEL)action
{
    [self.iconButton addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}

@end
